package org.lhh.server.common.utils;


import java.util.UUID;

public class IDUtils {

    private static final String id_prefix = PropertiesUtil.getString("id_prefix");

    public static String getId() {
        return id_prefix + uuid();
    }

    private static String uuid() {
        int hashCodeV = UUID.randomUUID().toString().hashCode();
        hashCodeV = hashCodeV < 0 ? -hashCodeV : hashCodeV;
        return System.currentTimeMillis() + String.format("%015d", hashCodeV);
    }
}
